package com.huichenghe.xinlvsh01.Utils;

import android.content.Context;

/**像素单位转换类
 * Created by lixiaoning on 15-11-13.
 */
public class DpUitls
{


    /**
     * dp转px
     * @param mContext
     * @return
     */
    public static float DpToPx(Context mContext, float dp)
    {
        float scale = mContext.getResources().getDisplayMetrics().density;
        return dp * scale + 0.5f;
    }
}
